﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="ProfilesViewAll.aspx.vb" Inherits="myproject.ProfilesViewAll" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div>
     <table width="920" cellspacing="30"
     style="border-style: groove">       
     <tr>
 
     <td>


     <table>
     <tr>
     <td>
     <h1 style="border-bottom-style: groove; width: 450px; ">All Users</h1>      
     </td>
     </tr>
     </table>
     <br />
     <br />
     <table>
     <tr>
     <td>

         <asp:ListView ID="lv_profilesViewAll" runat="server" DataKeyNames="ID" 
             DataSourceID="PorilesViewAllDataSource">
             <AlternatingItemTemplate>
                  
                 
                 <table>
                 <tr>
                 <td>
                 
                 <span style="background-color: #DCDCDC;color: #000000;">
                 <a href ='Profiles.aspx?UserName=<%# Eval("UserName") %>'>
                 <img src ='<%# Eval("Picture") %>' height ='300px' width ='300px' />
                 </a> 
                 <p><b>User Name: </b><%# Eval("UserName") %></p>
                 <p><b>Description: </b><%# Eval("Description")%></p>
                 </span>
                 <h1 style="border-bottom-style: ridge; width: 410px; "></h1>    
                 <br />  
                 </td>
                 </tr>
                 </table>
                 
                 
              
             </AlternatingItemTemplate>
             <EditItemTemplate>
                 <span style="background-color: #008A8C;color: #FFFFFF;">ID:
                 <asp:Label ID="IDLabel1" runat="server" Text='<%# Eval("ID") %>' />
                 <br />
                 FirstName:
                 <asp:TextBox ID="FirstNameTextBox" runat="server" 
                     Text='<%# Bind("FirstName") %>' />
                 <br />
                 LastName:
                 <asp:TextBox ID="LastNameTextBox" runat="server" 
                     Text='<%# Bind("LastName") %>' />
                 <br />
                 UserName:
                 <asp:TextBox ID="UserNameTextBox" runat="server" 
                     Text='<%# Bind("UserName") %>' />
                 <br />
                 Description:
                 <asp:TextBox ID="DescriptionTextBox" runat="server" 
                     Text='<%# Bind("Description") %>' />
                 <br />
                 Picture:
                 <asp:TextBox ID="PictureTextBox" runat="server" Text='<%# Bind("Picture") %>' />
                 <br />
                 <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                     Text="Update" />
                 <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                     Text="Cancel" />
                 <br /><br /></span>
             </EditItemTemplate>
             <EmptyDataTemplate>
                 <span>No data was returned.</span>
             </EmptyDataTemplate>
             <InsertItemTemplate>
                 <span style="">FirstName:
                 <asp:TextBox ID="FirstNameTextBox" runat="server" 
                     Text='<%# Bind("FirstName") %>' />
                 <br />LastName:
                 <asp:TextBox ID="LastNameTextBox" runat="server" 
                     Text='<%# Bind("LastName") %>' />
                 <br />UserName:
                 <asp:TextBox ID="UserNameTextBox" runat="server" 
                     Text='<%# Bind("UserName") %>' />
                 <br />Description:
                 <asp:TextBox ID="DescriptionTextBox" runat="server" 
                     Text='<%# Bind("Description") %>' />
                 <br />Picture:
                 <asp:TextBox ID="PictureTextBox" runat="server" Text='<%# Bind("Picture") %>' />
                 <br />
                 <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                     Text="Insert" />
                 <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                     Text="Clear" />
                 <br /><br /></span>
             </InsertItemTemplate>
             <ItemTemplate>
                 
                 
                 <table>
                 <tr>
                 <td>
                 
                 <span style="background-color: #DCDCDC;color: #000000;">
                 <a href ='Profiles.aspx?UserName=<%# Eval("UserName") %>'>
                 <img src ='<%# Eval("Picture") %>' height ='300px' width ='300px' />
                 </a> 
                 <p><b>User Name: </b><%# Eval("UserName") %></p>
                 <p><b>Description: </b><%# Eval("Description")%></p>
                 </span>
                 <h1 style="border-bottom-style: ridge; width: 410px; "></h1>    
                 <br />  
                 </td>
                 </tr>
                 </table>


             </ItemTemplate>
             <LayoutTemplate>
                 <div ID="itemPlaceholderContainer" runat="server" 
                     style="font-family: Verdana, Arial, Helvetica, sans-serif;">
                     <span runat="server" id="itemPlaceholder" />
                 </div>
                 <div style="text-align: center;background-color: #CCCCCC;font-family: Verdana, Arial, Helvetica, sans-serif;color: #000000;">
                     <asp:DataPager ID="DataPager1" runat="server">
                         <Fields>
                             <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                                 ShowNextPageButton="False" ShowPreviousPageButton="False" />
                             <asp:NumericPagerField />
                             <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" 
                                 ShowNextPageButton="False" ShowPreviousPageButton="False" />
                         </Fields>
                     </asp:DataPager>
                 </div>
             </LayoutTemplate>
             <SelectedItemTemplate>
                 <span style="background-color: #008A8C;font-weight: bold;color: #FFFFFF;">ID:
                 <asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' />
                 <br />
                 FirstName:
                 <asp:Label ID="FirstNameLabel" runat="server" Text='<%# Eval("FirstName") %>' />
                 <br />
                 LastName:
                 <asp:Label ID="LastNameLabel" runat="server" Text='<%# Eval("LastName") %>' />
                 <br />
                 UserName:
                 <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' />
                 <br />
                 Description:
                 <asp:Label ID="DescriptionLabel" runat="server" 
                     Text='<%# Eval("Description") %>' />
                 <br />
                 Picture:
                 <asp:Label ID="PictureLabel" runat="server" Text='<%# Eval("Picture") %>' />
                 <br />
<br /></span>
             </SelectedItemTemplate>
         </asp:ListView>
         <asp:SqlDataSource ID="PorilesViewAllDataSource" runat="server" 
             ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
             ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
             SelectCommand="SELECT [ID], [FirstName], [LastName], [UserName], [Description], [Picture] FROM [UserProfiles]">
         </asp:SqlDataSource>

     </td>
     </tr>
     <tr>
     <td>
          </td>
     </tr>
     </table>
 

     </td>
     

     <td>


     <table>
     <tr>
     <td>   
     
     </td>
     </tr>
     </table>
     
     </td>
 
 
     </tr>     
     </table>     
</div>
</asp:Content>
